home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
rddbase.arc
/
RDDBASE.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1986-01-29
|
912b
|
47 lines
Program RdDB3DBF;
Type
Data_Record = Record
Delete_Code :Char;
Job_Name :Array[1..28] of Char;
Filler :Array[1..587] of Char;
end;
Var
DBF_File :File;
Dbase_Record :Data_Record;
{$i RdDbase.Inc}
Var
I :Real;
X :Integer;
Begin
Open_Dbase_File(Dbf_File,'Customer.dbf');
(* Read the first ten dbase record if x = odd update the name field *)
For X:= 1 to 10 do
Begin
Read_Dbase_Record(Dbf_File,0,Dbase_Record);
Writeln(Dbase_Record.JOb_Name);
if Odd(X) then
begin
Dbase_Record.Job_Name[28]:='X';
Rewrite_Dbase_Record(Dbf_File,0,Dbase_Record);
end;
end;
(* Read The previous nine records showing the name field updated *)
For X:= 1 to 9 do
Begin
Read_Previous_Dbase_Record(Dbf_File,1,Dbase_Record);
Writeln(Dbase_Record.JOb_Name);
end;
Close_Dbase_File(DBF_File);
end.